from fake_useragent import UserAgent
import requests
link = 'https://www.sciencedirect.com/'
ua = UserAgent()
headers={"User-Agent":ua.random}  #ua.random随机变换headers

print(headers)
response=requests.get(url=link,headers = headers)
#响应状态信息
print(response.status_code)